package com.itheima.Demo01.demo04;

import java.util.concurrent.FutureTask;

public class CallableTest {
    public static void main(String[] args) {
        MyCallable m1 = new MyCallable();
        FutureTask<String> F1 = new FutureTask<>(m1);
        Thread T1 = new Thread(F1);
        T1.setName("大牛");
        T1.setPriority(5);
        T1.start();

        MyCallable m2 = new MyCallable();
        FutureTask<String> F2 = new FutureTask<>(m2);
        Thread T2 = new Thread(F2);
        T2.setName("小黑");
        T2.setPriority(5);
        T2.start();

    }
}
